package nju.edu.desserthouse.model;

import java.io.Serializable;
import java.util.Calendar;

import javax.persistence.*;

/**
 * Entity implementation class for Entity: Clerk
 *
 */
@Entity
@Table(name = "clerk")
public class Clerk implements Serializable {
	private static final long serialVersionUID = 1L;
	
	private long clerk_id;
	private String clerk_name;
	private String clerk_account;
	private String clerk_password;
	private int clerk_belong;
	private int clerk_privilege;
	
	public Clerk(){
		super();
	}
	
	@Id
	public long getId(){
		return clerk_id;
	}
	
	public void setId(long clerk_id){
		this.clerk_id = clerk_id;
	}
	
	public String getName(){
		return clerk_name;
	}
	
	public void setName(String clerk_name){
		this.clerk_name = clerk_name;
	}
	
	public String getAccount(){
		return clerk_account;
	}
	
	public void setAccount(String clerk_account){
		this.clerk_account = clerk_account;
	}
	
	public String getPassword(){
		return clerk_password;
	}
	
	public void setPassword(String clerk_password){
		this.clerk_password = clerk_password;
	}
	
	public int getBelong(){
		return clerk_belong;
	}
	
	public void setBelong(int clerk_belong){
		this.clerk_belong = clerk_belong;
	}
	
	public int getPrivilege(){
		return clerk_privilege;
	}
	
	public void setPrivilege(int clerk_privilege){
		this.clerk_privilege = clerk_privilege;
	}
	
	public void setIdByDate()
	{
		Calendar datetime=Calendar.getInstance();
		this.clerk_id=datetime.getTimeInMillis();
	}
}
